<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="../../common/common.jspf"%>
<link rel="stylesheet" href="${ctx}/css/layui.css"  media="all">	
<link rel="stylesheet" href="${ctx}/css/laydate.css"  media="all">	
<link rel="stylesheet" href="${ctx}/css/promotion/promotion.css"  media="all">	
<script type="text/javascript" src="${ctx}/js/goods/gift/addGift.js"></script>
<script>
	layui.use('laydate', function(){
	  var laydate = layui.laydate;
	  
	  var start = {
	    min: laydate.now()
	    ,max: '2099-06-16 23:59:59'
	    ,istoday: false
	    ,choose: function(datas){
	      end.min = datas; //开始日选好后，重置结束日的最小日期
	      end.start = datas //将结束日的初始值设定为开始日
	    }
	  };
	  
	  var end = {
	    min: laydate.now()
	    ,max: '2099-06-16 23:59:59'
	    ,istoday: false
	    ,choose: function(datas){
	      start.max = datas; //结束日选好后，重置开始日的最大日期
	    }
	  };
	  $('#LAY_demorange_s').onclick = function(){
		 alert(1);
	    start.elem = this;
	    laydate(start);
	  }
	  $('#LAY_demorange_e').onclick = function(){
		  alert(2);
	    end.elem = this
	    laydate(end);
	  } 
	  
	});
</script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
	text-align: right;
}

.col-sm-9 {
	width: 85%;
	float: left;
	text-align: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/goods/gift/addProGift">
		<input type="hidden" name="goods_id" id="goods_id" value="${goods_id}"> 
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="form-group">
				<label class="col-sm-3 control-label">促销类型</label>
				<div class="col-sm-9">
					<select class="form-control" onchange="proTypeOnchang(this)"  name="pro_type" id="pro_type">
						<option value="-1" selected="selected" >请选择</option>
						<!-- <option value="0" >订单满减</option>  -->
						<option value="1" >商品满减</option>
						<option value="3" >商品打折</option>
						<option value="2" >商品满赠</option>
					</select>
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">促销活动</label>
				<div class="col-sm-9">
					<select id="pro_id" name="pro_id"  onchange="proIdOnchang(this)" class="form-control m-b"
						tabindex="-1">
					</select>
				</div>
			</div>			
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">促销开始时间</label>
				<div class="col-sm-9" style="color: red;">
					<input class="layui-input" name="pro_start" disabled="disabled" id="LAY_demorange_s" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"><!-- onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" -->
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">促销结束时间</label>
				<div class="col-sm-9" style="color: red;">
					<input class="layui-input" name="pro_end" id="LAY_demorange_e" disabled="disabled"  onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"><!-- onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" -->
				</div>
			</div>
		</div>
		<footer class="panel-footer text-center bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xl">保存</button>
		</footer> </section>
	</form>
	
	<script type="text/javascript">
	onloadurl();
	</script>
	<script type="text/javascript"
		src="${ctx}/js/jquery/bootstrap-filestyle.min.js"></script>
</body>
</html>